<?php

class News_Form_FrontTools extends Zend_Form {

	public function init() {
		$this->setMethod('post');
		
		$month = $this->createElement('select', 'month');
		$month->setLabel(_('For:'));
		$month->addMultiOptions(array(
			'0' => _('All months'),
			'1' => _('January'),
			'2' => _('February'),
			'3' => _('March'),
			'4' => _('April'),
			'5' => _('May'),
			'6' => _('June'),
			'7' => _('July'),
			'8' => _('August'),
			'9' => _('September'),
			'10' => _('October'),
			'11' => _('November'),
			'12' => _('December')
		));
		$month->setValue(date("m"));
		
		$year = $this->createElement('select', 'year');
		//$year->setLabel(_('Year:'));
		
		$submit = $this->createElement('submit', 'submit');
		$submit->setLabel(_('Filter'));
		
		$this->addElements(array($month,$year,$submit));
		
		$this->setElementDecorators(array(
			'ViewHelper',
			array(array('data' => 'HtmlTag'), array('tag' => 'td')),
			array('Label', array('tag' => 'td')),
			//array(array('row' => 'HtmlTag'), array('tag' => 'tr'))
		));
		
		$submit->setDecorators(array('ViewHelper',
			array(array('data' => 'HtmlTag'), array('tag' => 'td')),
			array(array('emptyrow' => 'HtmlTag'), array('tag' => 'td')),
			//array(array('row' => 'HtmlTag'), array('tag' => 'tr')) ���������� � ���� ������
		));
		
		$this->setDecorators(array(
			'FormElements',
			array('HtmlTag', array('tag' => 'table')),
			'Form'
		));
	}
}